package com.example.mybatisplus.Util;

import net.sf.jsqlparser.expression.DateTimeLiteralExpression;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * @Author deyou
 * @Date 2022/1/14 11:02
 * @Version 1.0
 */
public class DateUtils {
    public static String dateFormat(Date date){
        DateFormat df1 = DateFormat.getDateInstance(DateFormat.FULL,Locale.CHINA);
        DateFormat df2 = DateFormat.getTimeInstance(DateFormat.FULL,Locale.CHINA);

        String dateString = df1.format(date);
        String timeString = df2.format(date);
        return dateString +" "+ timeString;
    }
}
